-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
child_process: revert exposing child process constructor #6619
child_process: revert exposing child process constructor #6619
Conversation
Not against this per se, but this should not happen without a proper deprecation cycle and without replacement functionality that serves the use cases that were addressed by the original change. |
Also, this is probably obvious, but the constructor is exposed anyway. Having it directly exported by the module just eases access to it. |
The constructor blocks a rewrite of child process behind require('child_process').ChildProcess, which would be a deprecation or legacy friendly way. Also exposing was not a good decision in general and rather fell through code review with bigger changes.
Care to clarify why you think this?
How did code review fail? The PR was open for 7 days before being merged. A member of the TC reviewed it and signed off on it.
I'm not sure what you are referring to here. A public issue was opened where this was requested.
Care to be more specific? |
Yeah. My point is that this was a really bad change since there are multiple ways of getting the constructor, but there is no obvious and I think also no user for this. In fact one could use |
It was buried in a +935 −848 diff and got commented on only once, with no reasoning whether this should be exported or not or in what what way. The discussion in general was really short, given what usual traffic is on the PRs usually. Also TC members do fail sometimes and an LGTM should sometimes be "have review thoroughly it doesn't break anything and is also good for future purposes and has meaningful value". It was opened by one person who is well known in the scene, apart from that person I don't see anyone really making any use of it. Only the persons attending the PR could have known of that kind feature, since there was no further documentation. Well the last comment means, that this was reaaaaaally bad what everyone did, but fortunately there won't be many consequences. However this can serve as an example how things should not happen. |
Alternatively we could move the exports to |
Sorry, I'm not seeing what is wrong with this? This is intended so that libraries can wrap the constructor easier?
Wait what are you claiming here? |
This is written several times now above. It's @isaacs posting a doubtfully useful request and immediate sign-off. Without considering alternatives, discussing it in a proper way and not even documenting it. |
As written above also this doesn't allow having a proper rewrite and hiding it in |
As written above also it could be moved to |
@eljefedelrodeodeljefe ok so just to be clear. Just because you don't find something useful, doesn't mean that it isn't useful. Also, as I have mentioned already, the sign-off was not immediate. The PR was open for 7 days.
Yea, I whole-heartedly disagree with this. Any rewrite will have to be at least somewhat backwards compatible, otherwise you will break a lot of the ecosystem. I also will say that I don't appreciate what you have insinuated in these posts. A lot of us don't get paid to work on core and this kind of shit makes it a lot harder to take time away from my family to try and make node better. I don't see how not landing this revert prevents one from rewriting |
I don't either but not getting paid is not justification to neglect any need of improving APIs and then also do such a thing. Technically your change back then might be okay, and not against the rules, but it also forcefully blocks any chance of improvement. I hope next time something like this comes up you think about design. |
Closing and hoorays for this and |
You are making some very accusatory claims here with not much to back them up.
Please stop saying this until you can actually justify your argument. Also, the way that change happened would happen the exact same today. If no one objects and someone steps up and signs off on a change, then we merge it in. If someone objects, then an attempt at consensus should be made. If that cannot happen, then it gets escalated to the CTC.
Design was considered when this was landed. It exposed the constructor. The other changes were for internal cleanup. Perhaps next time, try to be less confrontational and insulting and you may get better results... |
Let's make sure this doesn't devolve into insults. The PR is question went through proper review, and the functionality was previously deemed useful by multiple members of the core team. Calling "misconduct" on something is a big deal, fwiw. I suggest avoiding it. I'm not seeing any constructive way of going forward with this, personally. The constructor shouldn't usually be used on it's own but having easy access for wrapping via libraries is very useful. |
@evanlucas @Fishrock123 how satisfied are you with the implementation of |
That is not something on which a decision could be made without actually seeing the code. The general rule is to keep core small. That is noted in the onboarding document. A rewrite of |
@eljefedelrodeodeljefe Refactors are usually fine, but we can't change the exposed API too much (needs deprecation cycles etc), depending on downstream usage. |
Please also keep in mind that lots of core is a compromise in what we are able to do between interested parties. |
Yeeah that's all good and sound. But the question is rather whether this will be an immediate deferring, because "child process is good as it is"(?). Because I very much think it is the diametrical opposite. No, I would keep the API as it is, but just adding the new API to Yes, but it should be an easy compromise to decide, whether the current implementation is stuck and not good, yet it served its purpose since 2009, but it's time to start and integrate something new with all the learnings, while not breaking a anything and also being small in SLOC. |
Rewrite then would be the wrong word. |
¯_(ツ)_/¯ hard to know without seeing what you mean if you think it requires higher-level discussion maybe file an EP for it with that level of detail? |
sigh okay. Probably that's the best ahead-of-time answer I will get. |
Checklist
Affected core subsystem(s)
child_process
Description of change
The constructor blocks a rewrite of child process behind
require('child_process').ChildProcess, which would be a deprecation
or legacy friendly way. Also exposing was not a good decision in
general and rather fell through code review with bigger changes.
TBH code review failed here, because this small change was embedded in a pretty big one. Things like that should be handed in in 2 PRs #1760.
The consequence is that probably just one consumer, needs to add some 3 lines back in again. Also the constructor is not documented and I highly doubt that we should have back channeling of some known users just to make their lives a little easier. The tiny part is misconduct even though one with tiny impact.
cc @evanlucas, @chrisdickinson, @isaacs